<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PU2CLR Si4735 Arduino Library: Device Setup and Start up</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="logo_si4735.png"/></td>
  <td id="projectalign">
   <div id="projectname">PU2CLR Si4735 Arduino Library<span id="projectnumber">&#160;2.1.4</span>
   </div>
   <div id="projectbrief">Arduino Library for Si47XX Devices - By Ricardo Lima Caratti</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group07.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Device Setup and Start up</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga8bc001cb28dc8fbd88ba0fa7024eca39"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#ga8bc001cb28dc8fbd88ba0fa7024eca39">SI4735::setPowerUp</a> (uint8_t CTSIEN, uint8_t GPO2OEN, uint8_t PATCH, uint8_t XOSCEN, uint8_t FUNC, uint8_t OPMODE)</td></tr>
<tr class="memdesc:ga8bc001cb28dc8fbd88ba0fa7024eca39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Power Up parameters for si473X.  <br /></td></tr>
<tr class="separator:ga8bc001cb28dc8fbd88ba0fa7024eca39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3e228da65641f4dcf4253262e19bde9b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#ga3e228da65641f4dcf4253262e19bde9b">SI4735::radioPowerUp</a> (void)</td></tr>
<tr class="memdesc:ga3e228da65641f4dcf4253262e19bde9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Powerup the Si47XX.  <br /></td></tr>
<tr class="separator:ga3e228da65641f4dcf4253262e19bde9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga412f51386c47a17cf04fd0a3c3078726"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#ga412f51386c47a17cf04fd0a3c3078726">SI4735::analogPowerUp</a> (void)</td></tr>
<tr class="memdesc:ga412f51386c47a17cf04fd0a3c3078726"><td class="mdescLeft">&#160;</td><td class="mdescRight">You have to call setPowerUp method before.  <br /></td></tr>
<tr class="separator:ga412f51386c47a17cf04fd0a3c3078726"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa554b3390fb6c5a4d6661b96afae73ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#gaa554b3390fb6c5a4d6661b96afae73ae">SI4735::powerDown</a> (void)</td></tr>
<tr class="memdesc:gaa554b3390fb6c5a4d6661b96afae73ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves the device from powerup to powerdown mode.  <br /></td></tr>
<tr class="separator:gaa554b3390fb6c5a4d6661b96afae73ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2fbc7e2187a7c645879623100dbc8502"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#ga2fbc7e2187a7c645879623100dbc8502">SI4735::getFirmware</a> (void)</td></tr>
<tr class="memdesc:ga2fbc7e2187a7c645879623100dbc8502"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets firmware information.  <br /></td></tr>
<tr class="separator:ga2fbc7e2187a7c645879623100dbc8502"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56d6eebe36f8178efc080e6e134e0b9b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#ga56d6eebe36f8178efc080e6e134e0b9b">SI4735::setRefClock</a> (uint16_t refclk)</td></tr>
<tr class="memdesc:ga56d6eebe36f8178efc080e6e134e0b9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the frequency of the REFCLK from the output of the prescaler.  <br /></td></tr>
<tr class="separator:ga56d6eebe36f8178efc080e6e134e0b9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadafdd29bf1d22e43199abc4c2ac7b231"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#gadafdd29bf1d22e43199abc4c2ac7b231">SI4735::setRefClockPrescaler</a> (uint16_t prescale, uint8_t rclk_sel=0)</td></tr>
<tr class="memdesc:gadafdd29bf1d22e43199abc4c2ac7b231"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number used by the prescaler to divide the external RCLK down to the internal REFCLK.  <br /></td></tr>
<tr class="separator:gadafdd29bf1d22e43199abc4c2ac7b231"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8d0ff88ec989d714ab63da39f3897b4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#gaf8d0ff88ec989d714ab63da39f3897b4">SI4735::setup</a> (uint8_t <a class="el" href="class_s_i4735.html#a6470177f747ef7eb8e7d02c76f72b19e">resetPin</a>, uint8_t <a class="el" href="class_s_i4735.html#a015d495717833b3a7e0b4a5ea8f09158">ctsIntEnable</a>, uint8_t defaultFunction, uint8_t audioMode=<a class="el" href="_s_i4735_8h.html#afd6b0255af56b3deee67ef1fe14d2fd6">SI473X_ANALOG_AUDIO</a>, uint8_t clockType=<a class="el" href="_s_i4735_8h.html#a33a17dceb88b2b05d8032714a1998368">XOSCEN_CRYSTAL</a>, uint8_t <a class="el" href="class_s_i4735.html#aa1a6e6b5698880e9c72506d8d7f2dcb0">gpo2Enable</a>=0)</td></tr>
<tr class="memdesc:gaf8d0ff88ec989d714ab63da39f3897b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the Si473X device.  <br /></td></tr>
<tr class="separator:gaf8d0ff88ec989d714ab63da39f3897b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga944ed704e2175a6cf660ad65ca5bbad5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group07.html#ga944ed704e2175a6cf660ad65ca5bbad5">SI4735::setup</a> (uint8_t <a class="el" href="class_s_i4735.html#a6470177f747ef7eb8e7d02c76f72b19e">resetPin</a>, uint8_t defaultFunction)</td></tr>
<tr class="memdesc:ga944ed704e2175a6cf660ad65ca5bbad5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the Si473X device.  <br /></td></tr>
<tr class="separator:ga944ed704e2175a6cf660ad65ca5bbad5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga8bc001cb28dc8fbd88ba0fa7024eca39" name="ga8bc001cb28dc8fbd88ba0fa7024eca39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8bc001cb28dc8fbd88ba0fa7024eca39">&#9670;&#160;</a></span>setPowerUp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setPowerUp </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>CTSIEN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>GPO2OEN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>PATCH</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>XOSCEN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>FUNC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>OPMODE</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the Power Up parameters for si473X. </p>
<p>Use this method to chenge the defaul behavior of the Si473X. Use it before PowerUp()</p>
<p>About the parameter XOSCEN:</p>
<p>0 = Use external RCLK (crystal oscillator disabled);</p>
<p>1 = Use crystal oscillator (RCLK and GPO3/DCLK with external 32.768 kHz crystal and OPMODE = 01010000).</p>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 65 and 129</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8_t</td><td>CTSIEN sets Interrupt anabled or disabled (1 = anabled and 0 = disabled ) </td></tr>
    <tr><td class="paramname">uint8_t</td><td>GPO2OEN sets GP02 Si473X pin enabled (1 = anabled and 0 = disabled ) </td></tr>
    <tr><td class="paramname">uint8_t</td><td>PATCH Used for firmware patch updates. Use it always 0 here. </td></tr>
    <tr><td class="paramname">uint8_t</td><td>XOSCEN sets external Crystal enabled or disabled. 0 = Use external RCLK (crystal oscillator disabled); 1 = Use crystal oscillator </td></tr>
    <tr><td class="paramname">uint8_t</td><td>FUNC sets the receiver function have to be used [0 = FM Receive; 1 = AM (LW/MW/SW) and SSB (if SSB patch apllied)] </td></tr>
    <tr><td class="paramname">uint8_t</td><td>OPMODE set the kind of audio mode you want to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3e228da65641f4dcf4253262e19bde9b" name="ga3e228da65641f4dcf4253262e19bde9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e228da65641f4dcf4253262e19bde9b">&#9670;&#160;</a></span>radioPowerUp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::radioPowerUp </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Powerup the Si47XX. </p>
<p>Before call this function call the setPowerUp to set up the parameters.</p>
<p>Parameters you have to set up with setPowerUp</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Parameter   </th><th class="markdownTableHeadNone">Description    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">CTSIEN   </td><td class="markdownTableBodyNone">Interrupt anabled or disabled    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">GPO2OEN   </td><td class="markdownTableBodyNone">GPO2 Output Enable or disabled    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">PATCH   </td><td class="markdownTableBodyNone">Boot normally or patch    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">XOSCEN   </td><td class="markdownTableBodyNone">0 (XOSCEN_RCLK) = external active crystal oscillator. 1 (XOSCEN_CRYSTAL) = passive crystal oscillator;    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">FUNC   </td><td class="markdownTableBodyNone">defaultFunction = 0 = FM Receive; 1 = AM (LW/MW/SW) Receiver    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">OPMODE   </td><td class="markdownTableBodyNone">SI473X_ANALOG_AUDIO (B00000101) or SI473X_DIGITAL_AUDIO (B00001011)   </td></tr>
</table>
<p>ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group08.html#ga7bf47d3aab5952fa8895bd9094256dd8" title="Set the Max Delay after Set Frequency.">setMaxDelaySetFrequency()</a> </dd>
<dd>
<a class="el" href="_s_i4735_8h.html#a921cafdf244d2d7db9eeffa524e11663">MAX_DELAY_AFTER_POWERUP</a> </dd>
<dd>
<a class="el" href="_s_i4735_8h.html#a33a17dceb88b2b05d8032714a1998368">XOSCEN_CRYSTAL</a> </dd>
<dd>
<a class="el" href="_s_i4735_8h.html#a9d2a0e22f5a37d3911eef36581225dd2">XOSCEN_RCLK</a> </dd>
<dd>
<a class="el" href="group__group07.html#ga8bc001cb28dc8fbd88ba0fa7024eca39" title="Set the Power Up parameters for si473X.">SI4735::setPowerUp()</a> </dd>
<dd>
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 64, 129 </dd></dl>

<p class="reference">References <a class="el" href="group__group18.html#ga54a3a0f412aa6318df0046d478bd134f">SI4735::setHardwareAudioMute()</a>, and <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

<p class="reference">Referenced by <a class="el" href="group__group07.html#ga412f51386c47a17cf04fd0a3c3078726">SI4735::analogPowerUp()</a>, <a class="el" href="group__group08.html#ga753390952a1f2c2a98343979f1f3daa0">SI4735::setAM()</a>, <a class="el" href="group__group08.html#gacd89e7b8adefcbc4e89f802acb915906">SI4735::setFM()</a>, <a class="el" href="group__group20.html#ga505445484e643ae95a2a9300eac9c4c1">SI4735::setNBFM()</a>, <a class="el" href="group__group17.html#ga3e907ddf560a0c8286fa55768701b3da">SI4735::setSSB()</a>, and <a class="el" href="group__group07.html#gaf8d0ff88ec989d714ab63da39f3897b4">SI4735::setup()</a>.</p>

</div>
</div>
<a id="ga412f51386c47a17cf04fd0a3c3078726" name="ga412f51386c47a17cf04fd0a3c3078726"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga412f51386c47a17cf04fd0a3c3078726">&#9670;&#160;</a></span>analogPowerUp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::analogPowerUp </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>You have to call setPowerUp method before. </p>
<p>This function is still available only for legacy reasons. If you are using this function, please, replace it by radioPowerup(). </p><dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Use radioPowerUp instead. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group07.html#ga8bc001cb28dc8fbd88ba0fa7024eca39" title="Set the Power Up parameters for si473X.">SI4735::setPowerUp()</a> </dd>
<dd>
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 64, 129 </dd></dl>

<p class="reference">References <a class="el" href="group__group07.html#ga3e228da65641f4dcf4253262e19bde9b">SI4735::radioPowerUp()</a>.</p>

</div>
</div>
<a id="gaa554b3390fb6c5a4d6661b96afae73ae" name="gaa554b3390fb6c5a4d6661b96afae73ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa554b3390fb6c5a4d6661b96afae73ae">&#9670;&#160;</a></span>powerDown()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::powerDown </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Moves the device from powerup to powerdown mode. </p>
<p>After Power Down command, only the Power Up command is accepted.</p>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 67, 132 </dd>
<dd>
<a class="el" href="group__group07.html#ga3e228da65641f4dcf4253262e19bde9b" title="Powerup the Si47XX.">radioPowerUp()</a> </dd></dl>

<p class="reference">References <a class="el" href="group__group18.html#ga54a3a0f412aa6318df0046d478bd134f">SI4735::setHardwareAudioMute()</a>, and <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

<p class="reference">Referenced by <a class="el" href="group__group17.html#gadfc2c82524918224cf19fec5b7fcf6d1">SI4735::queryLibraryId()</a>, <a class="el" href="group__group08.html#ga753390952a1f2c2a98343979f1f3daa0">SI4735::setAM()</a>, and <a class="el" href="group__group08.html#gacd89e7b8adefcbc4e89f802acb915906">SI4735::setFM()</a>.</p>

</div>
</div>
<a id="ga2fbc7e2187a7c645879623100dbc8502" name="ga2fbc7e2187a7c645879623100dbc8502"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2fbc7e2187a7c645879623100dbc8502">&#9670;&#160;</a></span>getFirmware()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::getFirmware </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets firmware information. </p>
<p>The firmware information will be stored in firmwareInfo member variable</p>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 66, 131 </dd>
<dd>
<a class="el" href="class_s_i4735.html#ad03d545e53a7ca2fe072a7b03d60910e" title="firmware information">firmwareInfo</a> </dd></dl>

<p class="reference">References <a class="el" href="group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0">SI4735::waitToSend()</a>.</p>

<p class="reference">Referenced by <a class="el" href="group__group07.html#gaf8d0ff88ec989d714ab63da39f3897b4">SI4735::setup()</a>.</p>

</div>
</div>
<a id="ga56d6eebe36f8178efc080e6e134e0b9b" name="ga56d6eebe36f8178efc080e6e134e0b9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga56d6eebe36f8178efc080e6e134e0b9b">&#9670;&#160;</a></span>setRefClock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setRefClock </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>refclk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the frequency of the REFCLK from the output of the prescaler. </p>
<p>The REFCLK range is 31130 to 34406 Hz (32768 ±5% Hz) in 1 Hz steps, or 0 (to disable AFC). For example, an RCLK of 13 MHz would require a prescaler value of 400 to divide it to 32500 Hz REFCLK.</p>
<p>The reference clock frequency property would then need to be set to 32500 Hz.</p>
<p>RCLK frequencies between 31130 Hz and 40 MHz are supported, however, there are gaps in frequency coverage for prescaler values ranging from 1 to 10, or frequencies up to 311300 Hz. See table below.</p>
<p>Table REFCLK Prescaler </p><table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Prescaler   </th><th class="markdownTableHeadNone">RCLK Low (Hz)   </th><th class="markdownTableHeadNone">RCLK High (Hz)    </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">1   </td><td class="markdownTableBodyNone">31130   </td><td class="markdownTableBodyNone">34406    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">2   </td><td class="markdownTableBodyNone">62260   </td><td class="markdownTableBodyNone">68812    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">3   </td><td class="markdownTableBodyNone">93390   </td><td class="markdownTableBodyNone">103218    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">4   </td><td class="markdownTableBodyNone">124520   </td><td class="markdownTableBodyNone">137624    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">5   </td><td class="markdownTableBodyNone">155650   </td><td class="markdownTableBodyNone">172030    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">6   </td><td class="markdownTableBodyNone">186780   </td><td class="markdownTableBodyNone">206436    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">7   </td><td class="markdownTableBodyNone">217910   </td><td class="markdownTableBodyNone">240842    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">8   </td><td class="markdownTableBodyNone">249040   </td><td class="markdownTableBodyNone">275248    </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">9   </td><td class="markdownTableBodyNone">280170   </td><td class="markdownTableBodyNone">309654    </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">10   </td><td class="markdownTableBodyNone">311300   </td><td class="markdownTableBodyNone">344060   </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 34 and 35</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">refclk</td><td>The allowed REFCLK frequency range is between 31130 and 34406 Hz (32768 ±5%), or 0 (to disable AFC). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gadafdd29bf1d22e43199abc4c2ac7b231" name="gadafdd29bf1d22e43199abc4c2ac7b231"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadafdd29bf1d22e43199abc4c2ac7b231">&#9670;&#160;</a></span>setRefClockPrescaler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setRefClockPrescaler </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>prescale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>rclk_sel</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the number used by the prescaler to divide the external RCLK down to the internal REFCLK. </p>
<p>The range may be between 1 and 4095 in 1 unit steps.</p>
<p>For example, an RCLK of 13 MHz would require a prescaler value of 400 to divide it to 32500 Hz. The reference clock frequency property would then need to be set to 32500 Hz.</p>
<p>ATTENTION by default, this function assumes you are using the RCLK pin as clock source.</p>
<p>Example: The code below shows the setup for an active 4.9152MHz crystal </p><div class="fragment"><div class="line">rx.setRefClock(32768);</div>
<div class="line">rx.setRefClockPrescaler(150); <span class="comment">// will work with 4915200Hz active crystal =&gt; 4.9152MHz =&gt; (32768 x 150)</span></div>
<div class="line">rx.setup(RESET_PIN, 0, <a class="code hl_define" href="_s_i4735_8h.html#a1c63dbfe18d80af288cc79a5da666993">POWER_UP_AM</a>, <a class="code hl_define" href="_s_i4735_8h.html#afd6b0255af56b3deee67ef1fe14d2fd6">SI473X_ANALOG_AUDIO</a>, <a class="code hl_define" href="_s_i4735_8h.html#a9d2a0e22f5a37d3911eef36581225dd2">XOSCEN_RCLK</a>);</div>
<div class="ttc" id="a_s_i4735_8h_html_a1c63dbfe18d80af288cc79a5da666993"><div class="ttname"><a href="_s_i4735_8h.html#a1c63dbfe18d80af288cc79a5da666993">POWER_UP_AM</a></div><div class="ttdeci">#define POWER_UP_AM</div><div class="ttdef"><b>Definition:</b> SI4735.h:27</div></div>
<div class="ttc" id="a_s_i4735_8h_html_a9d2a0e22f5a37d3911eef36581225dd2"><div class="ttname"><a href="_s_i4735_8h.html#a9d2a0e22f5a37d3911eef36581225dd2">XOSCEN_RCLK</a></div><div class="ttdeci">#define XOSCEN_RCLK</div><div class="ttdef"><b>Definition:</b> SI4735.h:210</div></div>
<div class="ttc" id="a_s_i4735_8h_html_afd6b0255af56b3deee67ef1fe14d2fd6"><div class="ttname"><a href="_s_i4735_8h.html#afd6b0255af56b3deee67ef1fe14d2fd6">SI473X_ANALOG_AUDIO</a></div><div class="ttdeci">#define SI473X_ANALOG_AUDIO</div><div class="ttdef"><b>Definition:</b> SI4735.h:182</div></div>
</div><!-- fragment --><p>Example: The code below shows the setup for an active 13MHz crystal </p><div class="fragment"><div class="line">rx.setRefClock(32500);</div>
<div class="line">rx.setRefClockPrescaler(400); <span class="comment">// 32500 x 400 = 13000000 (13MHz)</span></div>
<div class="line">rx.setup(RESET_PIN, 0, <a class="code hl_define" href="_s_i4735_8h.html#a1c63dbfe18d80af288cc79a5da666993">POWER_UP_AM</a>, <a class="code hl_define" href="_s_i4735_8h.html#afd6b0255af56b3deee67ef1fe14d2fd6">SI473X_ANALOG_AUDIO</a>, <a class="code hl_define" href="_s_i4735_8h.html#a9d2a0e22f5a37d3911eef36581225dd2">XOSCEN_RCLK</a>);</div>
</div><!-- fragment --> <dl class="section see"><dt>See also</dt><dd>Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 34 and 35</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prescale</td><td>Prescaler for Reference Clock value; Between 1 and 4095 in 1 unit steps. Default is 1. </td></tr>
    <tr><td class="paramname">rclk_sel</td><td>0 = RCLK pin is clock source (default); 1 = DCLK pin is clock source </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gaf8d0ff88ec989d714ab63da39f3897b4" name="gaf8d0ff88ec989d714ab63da39f3897b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf8d0ff88ec989d714ab63da39f3897b4">&#9670;&#160;</a></span>setup() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setup </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>resetPin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>ctsIntEnable</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>defaultFunction</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>audioMode</em> = <code><a class="el" href="_s_i4735_8h.html#afd6b0255af56b3deee67ef1fe14d2fd6">SI473X_ANALOG_AUDIO</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>clockType</em> = <code><a class="el" href="_s_i4735_8h.html#a33a17dceb88b2b05d8032714a1998368">XOSCEN_CRYSTAL</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>gpo2Enable</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the Si473X device. </p>
<p>Use this function to start the device up with the parameters shown below.</p>
<p>If the audio mode parameter is not entered, analog mode will be considered.</p>
<p>You can use any Arduino digital pin. Be sure you are using less than 3.6V on Si47XX RST pin.</p>
<p>ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">resetPin</td><td>Digital Arduino Pin used to RESET de Si47XX device. </td></tr>
    <tr><td class="paramname">ctsIntEnable</td><td>CTS Interrupt Enable. </td></tr>
    <tr><td class="paramname">defaultFunction</td><td>is the mode you want the receiver starts. </td></tr>
    <tr><td class="paramname">audioMode</td><td>default SI473X_ANALOG_AUDIO (Analog Audio). Use SI473X_ANALOG_AUDIO or SI473X_DIGITAL_AUDIO. </td></tr>
    <tr><td class="paramname">clockType</td><td>0 = Use external RCLK (crystal oscillator disabled); 1 = Use crystal oscillator </td></tr>
    <tr><td class="paramname">gpo2Enable</td><td>GPO2OE (GPO2 Output) 1 = Enable; 0 Disable (defult) </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">References <a class="el" href="group__group07.html#ga2fbc7e2187a7c645879623100dbc8502">SI4735::getFirmware()</a>, <a class="el" href="group__group07.html#ga3e228da65641f4dcf4253262e19bde9b">SI4735::radioPowerUp()</a>, <a class="el" href="group__group06.html#gadc6014674bd4d1ee3aab56c605926db1">SI4735::reset()</a>, and <a class="el" href="group__group18.html#ga54a3a0f412aa6318df0046d478bd134f">SI4735::setHardwareAudioMute()</a>.</p>

</div>
</div>
<a id="ga944ed704e2175a6cf660ad65ca5bbad5" name="ga944ed704e2175a6cf660ad65ca5bbad5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga944ed704e2175a6cf660ad65ca5bbad5">&#9670;&#160;</a></span>setup() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setup </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>resetPin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>defaultFunction</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the Si473X device. </p>
<p>Use this setup if you are not using interrupt resource.</p>
<p>If the audio mode parameter is not entered, analog mode will be considered.</p>
<p>You can use any Arduino digital pin. Be sure you are using less than 3.6V on Si47XX RST pin.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uint8_t</td><td>resetPin Digital Arduino Pin used to RESET command. </td></tr>
    <tr><td class="paramname">uint8_t</td><td>defaultFunction. 0 = FM mode; 1 = AM </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
